﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenTK.Graphics;

namespace AirHockey
{
    public class Material
    {
        #region Members
        private float ns;//specular coefficent
        private Color4 ka;//ambient color
        private Color4 kd;//diffuse color
        private Color4 ks;//specular color
        private float ni;//optical density
        private float d;//transparency
        private int illumOption;//illumination setting
        private string materialName;
        #endregion

        #region Properties
        /// <summary>
        /// Returns the Ambient Color
        /// </summary>
        public Color4 Ka
        {
            get { return ka; }
            set { ka = value; }
        }

        /// <summary>
        /// Returns the Diffuse Color
        /// </summary>
        public Color4 Kd
        {
            get { return kd; }
            set { kd = value; }
        }

        /// <summary>
        /// Returns the Specular Color
        /// </summary>
        public Color4 Ks
        {
            get { return ks; }
            set { ks = value; }
        }

        /// <summary>
        /// Returns the transparency
        /// </summary>
        public float D
        {
            get { return d; }
            set { d = value; }
        }

        /// <summary>
        /// Returns the Optical Density
        /// </summary>
        public float Ni
        {
            get { return ni; }
            set { ni = value; }
        }

        /// <summary>
        /// Returns the Specular Coefficent
        /// </summary>
        public float Ns
        {
            get { return ns; }
            set { ns = value; }
        }

        /// <summary>
        /// Returns the Illumination Setting
        /// </summary>
        public int IllumOption
        {
            get { return illumOption; }
            set { illumOption = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public string MaterialName
        {
            get { return materialName; }
            set { materialName = value; }
        }
        #endregion

        #region Constructor
        /// <summary>
        /// Constructor
        /// </summary>
        public Material()
        {
            this.materialName = string.Empty;
            this.ka = new Color4();
            this.kd = new Color4();
            this.ks = new Color4();
            this.d = -1f;
            this.ni = -1f;
            this.ns = -1f;
            this.illumOption = -1;
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="materialName">Name of the Material</param>
        /// <param name="ka">Ambient Color</param>
        /// <param name="kd">Diffuse Color</param>
        /// <param name="ks">Specular Color</param>
        /// <param name="d">Transparency</param>
        /// <param name="ni">Optical Density</param>
        /// <param name="ns">Specular Coefficent</param>
        /// <param name="illumOption">Illumination Option</param>
        public Material(string materialName, Color4 ka, Color4 kd, Color4 ks, float d, float ni, float ns, int illumOption)
        {
            this.materialName = materialName;
            this.ka = ka;
            this.ks = ks;
            this.d = d;
            this.ni = ni;
            this.ns = ns;
            this.illumOption = illumOption;
        }
        #endregion
    }
}
